<template>
  <div style="height:100%;">
    <div>
      <p>{{name}}</p>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="近三天" name="1"></el-tab-pane>
        <el-tab-pane label="近一周" name="2"></el-tab-pane>
        <el-tab-pane label="近一月" name="3"></el-tab-pane>
        <el-tab-pane label="近半年" name="4"></el-tab-pane>
        <el-tab-pane label="近一年" name="5"></el-tab-pane>
        <el-tab-pane label="所有" name="0"></el-tab-pane>
      </el-tabs>
      <div style="height:calc(100% - 76px); overflow-y:auto;overflow-x:hidden;">
        <lt ref="userlist"></lt>
      </div>
    </div>
  </div>
</template>

<script>
import { jdDataListXQEven } from '../../../../api/index';
import lt from './tem/LT.vue';

export default {
  data() {
    return {
      name: '',
      activeName: '1',
      id: '',
      uId: '',
    };
  },
  created() {

  },
  components: {
    lt
  },

  methods: {
    //切换tap
    handleClick() {
      this.getUserList();
    },
    //获取客户列表
    getUserList() {
      let obj = {
        id: this.id,
        uId: this.uId,
        name: this.name,
        type: this.activeName
      };
      this.$refs.userlist.$emit("getInit", obj)
    },
  },
  mounted() {
    this.$nextTick(function() {
      this.$on("detailsInit", function(obj) {
        this.name = obj.vName;
        this.id = obj.vUserid;
        this.uId = obj.uId;
        this.getUserList();
      })
    })
  }
};
</script>

<style scoped>
/deep/ :focus {
    outline: 0;
}
</style>